<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="ajax" uri="javawebparts/ajaxparts/taglib"%>
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<s:form action="%{action}" method="post" theme="simple">
<s:hidden name="user.active" value="%{user.active}" ></s:hidden>
	<table width="100%">
		<tr>
			<td>
				<div class="blue-text16" style="margin: 0px 0px 0px 0px">
					<s:if test="#session.user == null">
						<s:text name="lable.registration.newaccountsignup" />
					</s:if>
					<s:else>
						<s:text name="lable.registration.editregistrationinformation" />
					</s:else>
				</div>
				<div class="header-separator-bg" style="margin: 10px 5px 17px 0px"></div>
				<div style="margin: 0px 0px 12px 0px" class="common-text">
					<s:text name="lable.registration.parm1" />
					<br>
					<OL>
						<LI>
							<s:text name="lable.registration.parm2" />
						</LI>
						<LI>
							<s:text name="lable.registration.parm3" />
						</LI>
						<LI>
							<s:text name="lable.registration.parm4" />
						</LI>
					</OL>

					<s:text name="lable.registration.parm5" />
			</td>
		</tr>
		<tr>
			<td>
				<table class="common-text">
					<tr>
						<td>
							&nbsp;
						</td>
						<td>
							<s:actionerror cssClass="error-text" />
							<s:fielderror cssClass="error-text" />
						</td>
					</tr>
					<tr>
						<td align="right" class="search-text">
							<s:text name="lable.registration.userId"/>
						</td>
						<td>
							<table>
								<tr>
									<td>
										<s:if test="#session.user == null">
											<s:textfield cssClass="textfield" theme="simple"
												name="user.userId" value="%{user.userId}" label="User ID"
												 />
										</s:if>
										<s:else>
											<s:textfield cssClass="textfield" theme="simple"
												name="user.userId" value="%{user.userId}" label="User ID"
												 readonly="true"/>
										</s:else>
										*
									</td>
									<td class="common-text">
										<s:text name="lable.registration.parm6" />
									</td>
								</tr>
							</table>
						</td>
					</tr>

					<tr>
						<td align="right" class="search-text">
							<s:text name="lable.registration.password" />
						</td>
						<td>
							<table>
								<tr>
									<td>
										<s:if test="#session.user == null">
											<s:password cssClass="textfield" theme="simple"
											name="user.password" value=""
											showPassword="true" label="Password" />
										</s:if>
										<s:else>
											<s:password cssClass="textfield" theme="simple"
											name="user.password" value="%{user.password}"
											showPassword="true" label="Password"  />
										</s:else>

										*
									</td>

									<td class="common-text">
										<s:text name="lable.registration.parm7" />
									</td>
								</tr>
							</table>
						</td>
					</tr>

					<tr>
						<td align="right" class="search-text" width="19%">
							<s:text name="lable.registration.confirmpassword" />
						</td>
						<td>
							<table>
								<tr>
									<td>
										<s:if test="#session.user == null">
											<s:password cssClass="textfield" theme="simple"
											name="confirmPassword" value=""
											showPassword="true" label="Confirm Password" />
										</s:if>
										<s:else>
											<s:password cssClass="textfield" theme="simple"
											name="confirmPassword" value="%{user.password}"
											showPassword="true" label="Confirm Password" />
										</s:else>

										*
									</td>
									<td class="common-text">
										<s:text name="lable.registration.parm8" />
									</td>
								</tr>
							</table>
						</td>
					</tr>

					<tr>
						<td align="right" class="search-text">
							<s:text name="lable.registration.email" />
						</td>
						<td>
							<table>
								<tr>
									<td>
										<s:if test="#session.user == null">
											<s:textfield cssClass="textfield" theme="simple"
											name="user.email" value="%{user.email}" label="Email" />
										</s:if>
										<s:else>
											<s:textfield cssClass="textfield" theme="simple"
											name="user.email" value="%{user.email}" label="Email" readonly="true" />
										</s:else>

									</td>

									<td class="common-text">
										* <s:text name="lable.registration.parm9" />
									</td>
								</tr>
							</table>
						</td>
					</tr>

					<tr>
						<td align="right" class="search-text">
							<s:text name="lable.registration.firstname" />
						</td>
						<td>
							<table>
								<tr>
									<td>
										<s:textfield cssClass="textfield" theme="simple"
											name="user.firstName" value="%{user.firstName}"
											label="First name" />
										*
									</td>
									<td></td>
								</tr>
							</table>
						</td>
					</tr>

					<tr>
						<td align="right" class="search-text">
							<s:text name="lable.registration.lastname" />
						</td>
						<td>
							<table>
								<tr>
									<td>
										<s:textfield cssClass="textfield" theme="simple"
											name="user.lastName" value="%{user.lastName}"
											label="Last name" />
										*
									</td>
									<td></td>

								</tr>
							</table>
						</td>
					</tr>

					<tr>
						<td align="right" class="search-text">
							<b><s:text name="lable.registration.company" />
						</td>
						<td>
							<table>

								<tr>
									<td>
										<s:textfield cssClass="textfield" theme="simple"
											name="user.company" value="%{user.company}" label="Company" />
									</td>
									<td></td>
								</tr>
							</table>
						</td>
					</tr>

					<tr>
						<td align="right" class="search-text">
							<b><s:text name="lable.registration.jobtitle" />
						</td>
						<td>
							<table>
								<tr>
									<td>
										<s:textfield cssClass="textfield" theme="simple"
											name="user.jobTitle" value="%{user.jobTitle}"
											label="Job title" />
									</td>
									<td></td>
								</tr>
							</table>
						</td>
					</tr>

					<!--Region_Form:Region_List-->
					<tr>
						<td align="right" class="search-text">
							<b><s:text name="lable.registration.region" />
						</td>

						<td>
							<table>
								<tr>
									<td>
										<s:select theme="simple" cssClass="textfield"
											headerValue="Select Region" headerKey="0"
											name="user.region.categoryId"
											value="%{user.region.categoryId}" id="region"
											list="regionList" listKey="categoryId" listValue="categoryName"></s:select>
										<ajax:event ajaxRef="RegistrationForm/showCountryChange" />
										*
									</td>
									<td></td>

								</tr>
							</table>
						</td>
					</tr>
					<tr>
						<td align="right" class="search-text">
							<b><s:text name="lable.registration.country" />
						</td>

						<td>
							<table>
								<tr>
									<td>
										<s:select theme="simple" cssClass="textfield"
												headerValue="Select Country" headerKey="0"
												name="user.country.categoryId"
												value="%{user.country.categoryId}" id="country"
												list="countryList" listKey="categoryId" listValue="categoryName"></s:select>
											<ajax:event ajaxRef="RegistrationForm/showStateChange" />
											*
									</td>
									<td></td>
								</tr>
							</table>
						</td>
					</tr>
					<tr>
						<td align="right" class="search-text">
							<b><s:text name="lable.registration.state" />
						</td>
						<td>
							<table>
								<tr>
									<td>
										<s:select theme="simple" name="user.state.categoryId"
												cssClass="textfield" headerKey="0" id="state"
												headerValue="Select State" value="%{user.state.categoryId}"
												list="stateList" listKey="categoryId" listValue="categoryName" />
											*
									</td>
									<td></td>
								</tr>
							</table>
						</td>
					</tr>

					<tr>
						<td align="right" class="search-text">
							<b><s:text name="lable.registration.city" />
						</td>
						<td>
							<table>
								<tr>
									<td>
										<s:textfield cssClass="textfield" theme="simple"
											name="user.city" value="%{user.city}" label="City" />
										*
									</td>
									<td></td>
								</tr>

							</table>
						</td>
					</tr>

					<tr>
						<td align="right" class="search-text">
							<b><s:text name="lable.registration.zip" />
						</td>
						<td>
							<table>
								<tr>

									<td>
										<s:textfield cssClass="textfield" theme="simple"
											name="user.zip" value="%{user.zip}" label="Zip" />
										*
									</td>
									<td></td>
								</tr>
							</table>
						</td>
					</tr>

					<tr>
						<td align="right" class="search-text">
							<b><s:text name="lable.registration.street" />
						</td>
						<td>
							<table>
								<tr>
									<td>
										<s:textfield cssClass="textfield" theme="simple"
											name="user.street" value="%{user.street}" label="Street" />
										*
									</td>
									<td></td>
								</tr>
							</table>
						</td>
					</tr>

					<tr>
						<td align="right" class="search-text">
							<b><s:text name="lable.registration.language" />
						</td>
						<td>
							<table>
								<tr>
									<td>
										<s:select theme="simple" name="user.languages.languageCode"
											list="languageList" listKey="languageCode"
											listValue="languageName" cssClass="textfield"
											value="%{user.languages.languageCode}" />
									</td>

									<td></td>
								</tr>
							</table>
						</td>
					</tr>

					<tr>
						<td align="right" class="search-text">
							<b><s:text name="lable.registration.phone" />
						</td>
						<td>
							<table>
								<tr>
									<td>
										<s:textfield cssClass="textfield" theme="simple"
											name="user.phone" value="%{user.phone}" label="Phone" />
										*
									</td>
									<td></td>
								</tr>
							</table>
						</td>
					</tr>

					<tr>
						<td align="right" class="search-text">
							<b><s:text name="lable.registration.mobile" />
						</td>
						<td>
							<table>
								<tr>
									<td>
										<s:textfield cssClass="textfield" theme="simple"
											name="user.mobile" value="%{user.mobile}" label="Mobile" />
									</td>
									<td></td>
								</tr>

							</table>
						</td>
					</tr>

					<tr>
						<td align="right" class="search-text">
							<b><s:text name="lable.registration.fax" />
						</td>
						<td>
							<table>
								<tr>
									<td>
										<s:textfield cssClass="textfield" theme="simple"
											name="user.fax" value="%{user.fax}" label="Fax" />
									</td>
									<td></td>
								</tr>
							</table>
						</td>
					</tr>

					<tr>
						<td align="right" class="search-text">
							<b><s:text name="lable.registration.websiteurl" />
						</td>
						<td>
							<table>
								<tr>
									<td>
										<s:textfield cssClass="textfield" theme="simple"
											name="user.webSiteAddress" value="%{user.webSiteAddress}"
											label="Web site address" />
									</td>
									<td class="common-text"><s:text name="lable.registration.parm10" /></td>
								</tr>
							</table>
						</td>
					</tr>

					<tr>
						<td align="right" class="search-text">
							<b><s:text name="lable.registration.promotionalcode" />
						</td>
						<td>
							<table>
								<tr>
									<td>
										<s:textfield cssClass="textfield" theme="simple"
											name="user.promotionalCode" value="%{user.promotionalCode}"
											label="Promotional code" />
									</td>
									<td class="common-text">
										<s:text name="lable.registration.parm11" />
									</td>
								</tr>

							</table>
						</td>
					</tr>

					<tr>
						<td align="right" class="search-text">
							<b><s:text name="lable.registration.numberformat" />
						</td>
						<td>
							<table>
								<tr>

									<td>
										<s:select theme="simple" name="user.numberFormat.id"
											list="numberFormatList" listKey="id" listValue="sample"
											cssClass="textfield" value="%{user.numberFormat.id}" />
									</td>
									<td></td>
								</tr>
							</table>
						</td>
					</tr>

					<tr>
						<td align="right" class="search-text">
							<b><s:text name="lable.registration.dateformat" />
						</td>
						<td>
							<table>
								<tr>
									<td>
										<s:select theme="simple" name="user.dateFormat.id"
											list="dateFormatList" listKey="id" listValue="format"
											cssClass="textfield" value="%{user.dateFormat.id}" />
									</td>
									<td></td>
								</tr>
							</table>
						</td>
					</tr>

					<tr>
						<td align="right" class="search-text">
							<b><s:text name="lable.registration.usertimezone" />
						</td>
						<td>
							<s:hidden name="timezoneId" value="%{user.timezones.id}" />
							<table>
								<tr>
									<td>
										<s:if test="#session.user != null">
											<s:select theme="simple" name="user.timezones.id"
												list="timezoneList" listKey="id" cssClass="textfield"
												listValue="timezoneLocation" value="%{user.timezones.id}" />
										</s:if>
										<s:else>
											<s:select theme="simple" name="user.timezones.id"
												list="timezoneList" listKey="id" cssClass="textfield"
												listValue="timezoneLocation" value="%{timezoneId}" />
										</s:else>
									</td>

									<td></td>
								</tr>
							</table>
						</td>
					</tr>

					<tr>
						<td align="right" class="search-text">
							<s:text name="lable.registration.vatid" />
						</td>
						<td>
							<table>
								<tr>

									<td>
										<div id="txtVat">
											<s:textfield cssClass="textfield" theme="simple"
												name="user.vatidnr1" value="%{user.vatidnr1}"
												label="VAT-ID Nr." />
											<s:textfield cssClass="textfield" theme="simple"
												name="user.vatidnr2" value="%{user.vatidnr2}" label="" />

										</div>
									</td>
									<td></td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
			<s:if test="action != 'updateRegistrationForm.htm'">
				<table class="common-text">
					<tr>
						<td width="225">
							<img id="captcha" src="Captcha.jpg" align="middle"
								alt="Enter the characters appearing in this image" border="1" />
						</td>
						<td>
							<input type="text" name="captcha" value="" class="textfield">
							<br>
							<s:text name="lable.registration.parm12" />
						</td>
					</tr>
				</table>
			</s:if>
				<table class="common-text">
				<s:if test="action != 'updateRegistrationForm.htm'">
					<tr>
						<td>
							<s:text name="lable.registration.parm13" />
						</td>
					</tr>
					<tr>
						<td>
							<s:text name="lable.registration.parm14" />
							<A
								HREF="termsOfUse.htm"><s:text name="lable.registration.parm15" /></A>.
						</td>
					</tr>
					<tr>
						<td>
							<s:checkbox name="terms" theme="simple"/><s:text name="lable.registration.parm16" />
						</td>
					</tr>
				</s:if>
					<tr>
						<td>
							<table>
								<tr>
									<td>
										<table border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td><img src="images/middle/btn-grey-left1.gif" alt=" " width="6" height="23" /></td>
												<td class="btn-grey-middle1 "><s:submit value="%{getText('button.submit')}" theme="simple" cssClass="submit-btn-common" /></td>
												<td><img src="images/middle/btn-grey-right1.gif" alt=" " width="6" height="23" /></td>
											</tr>
										</table>
									</td>
									<td>
										<table border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td><img src="images/middle/btn-grey-left1.gif" alt=" " width="6" height="23" /></td>
												<td class="btn-grey-middle1 "><s:reset value="%{getText('button.reset')}" theme="simple" cssClass="submit-btn-common" /></td>
												<td><img src="images/middle/btn-grey-right1.gif" alt=" " width="6" height="23" /></td>
											</tr>
										</table>
									</td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
	<ajax:enable />
	<s:hidden name="user.id" value="%{user.id}" />
	<s:hidden name="referal" value="%{referal}" />
</s:form>
